import request from '@/utils/request'
export function getAllChannels () {
  return request({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}

export function addChannel (obj) {
  return request({
    method: 'PATCH',
    url: '/app/v1_0/user/channels',
    data: {
      channels: [obj]
    }
  })
}

export function deleteUserChannel (id) {
  return request({
    method: 'DELETE',
    url: `/app/v1_0/user/channels/${id}`
  })
}

// restful api
// get 获取
// post 新增
// put(所有的属性全部修改) patch(只是对个别属性修改 打补丁式修改)
// delete 删除
